Abscissa 1.5
	a 2D Plot and Fit Program
Abscissa is a program to display and print data given by a table in an x-y plane. Further it is possible to create and modify data by user-entered functions. Parameters of these functions can be calculated to fit to given data by using least-squares methode. 

	Starting
There are several ways to make a plot:
-	start Abscissa and use Command V to paste in data
-	use the 'service' command while selecting one or more data files in workspace manager
-	select data in an arbitrary program and use the service menu
-	use the 'open file' command in the file menu
-	start the argus mode and fill the pasteboard with data
-	double-click on a layout-file (*.abs)
-	drag a file on the docked program while pressing the command-key
-	start Abscissa from a shell and specify files

If the 'append read' option is not set previous data are erased before reading else they will be preserved.

	Data Format
Data are expected to be in ascii format. The first column is interpreted to contain the x-coordinate, the second contains the y-coordinate. Following columns are taken as y-coordinate of additional curves. A blank line is used to separate groups of curves. A curve is a string of x-y-points. The first line of a group of curves can consist names of the columns below. If only one column is given then it is taken as y-data and x-data are internal filled with integers starting at 1.

	Output
Pictures can be printed saved to file or copied to paste board. The postscript code is structured to make it easier to edit. Modifications of numerical data like smoothing can be written to file.

	Defaults
The following value are taken from the default database: 
NXFont ("Times-Roman"), NXFontSize ("16.0"), windowWidth ("17.8") in cm and windowHeight ("13.1") in cm.

	Panels
The default unit of length is one point (1/72 inch).
	Curves
On top of this panel the name and number of the selected curve is displayed. All properties of this curve are displayed below. '#sum' is an integer number of data point to be used for calculate the mean of them. The result curve consists of less data points and less extremes. '#interpol' determines the resolution used for interpolation. 'FFT' is an algorithm based on fast fourier transformation which assumed that the x-data points are equally spaced. In this mode '#interpol' contains the number of points to be in the smooth range (not necessarily an integer). The first line of the button matrix contains symbols drawn by lines. The other symbols are characters of the ZapfDingbats font.
If an input file contains more than two columns the third and fourth can be use as length of x- or y- error bars. To do so load the file, click on the curve that holds the error data, specify it as y-error-bar and click 'OK'.
The 'operation' sub menu is useful if you don't need a curve anymore and want to delete it. The 'push-back' command can be used to arrange especially filled curves. The 'make x-data' command swaps x- and y-data and the 'clone' command makes a duplicate of the selected curve.

	Function
Pressing the 'show' button the program creates a new curve. The new curve has 300 points, all in the selected range (with <command> <alternate>) or if no range is selected the visible range is used. If this curve exist it is possible to change the resolution by changing the '#interpol' field in the 'curves' panel and pressing 'show'. This temporary curve can be made permanent by pressing 'fix'. The 'modify' and 'fit' buttons are described below.

	Function Board
This panel can store results of fitting. The 'Fit Parameter' command imports currently displayed parameters. 'set Para' exports selected parameters. The 'result' button is useful to verify the numerical result. 

	Options
 Use 'fiterr=sqrt(y)' if you fit count rates. Use 'fiterr=y/10' if you fit while the y-axis is logarithmic. The 'auto-range' switch can prevent automatic rescaling. 
 
	Axis
 Select the X- or Y-button to display or modify the parameters of the main axes (lower x-axis and left y-axis). A second y-axis can be displayed at the right. Therefor click the '2.y-axis' button and turn off the 'no line' and 'no number' option and click 'OK'. If 'Min' and 'Max' are 0.0 then the values of the main axis are used instead. Turn on the 'right€y-axis'  switch in the 'Curve' panel to attach a curve to the second axis.

	Clicks
A click near to a curve displays the curve panel and shows the curve parameter. 
To zoom draw a box on screen. To zoom out hold down the <alternate> key. 
To select a range for fitting or creating a new curve hold down <alternate><command> key.
To fill parameters with values use <command> key.
To verify the coordinates of a point of a curve hold down <control> key.
To delete a data point click it while <control><command> is down
To add the coordinates of a data point to the 'Function Output'-panel click it while <control><shift> is down

	Expressions
Expressions are made by the independent variable 'x', operators, functions, constancies, parameters and table data. Table data are represented by Y0, Y1, ...,Y9 for the first, second,... last curve. They are calculated by an akima interpolation at the value of 'x'.

	Functions
Following functions are defined:
	sin,cos,tan,asin,acos,atan,exp,ln,sqrt,Abs,Floor,
	Rint,Even,
G(x,x0,a,w)=a*exp(-((x-x0)/w)^2 * 4 * ln(2)) => G(0,0,1,1)=1, G(0.5,0,1,1)=0.5
	L(x,x0,a,w)=a/(1+4*((x-x0)/w)^2)
V(x,x0,a,w,lor) is an approximated voigt function. 'lor' is the ratio width(lorenz)/(w(lor)+w(gauss)). 'lor' should be provided by a min and max value in 0..1. V(x,0,1,w,0.5) calculates the function with maximal error = 5e-3.
if(condition, result_0, result_1 [,...]) returns result_k depending on the value of condition (false=0, true=1).
Der(f(x),x) = (f(xi)-f(xi-1)) / (xi-xi-1)  numerical derivation. f(x) should be an expression.
Int(f(x),x) = (f(xi)+f(xi-1)) * (xi-xi-1) /2  num.integration. The following produce the "error function": 1/sqrt(2*pi)*Int(exp(-0.5*x^2),x)
Yat(n,f(x)) = linear interpolation of Y<n> at f(x). For instance Yat(2,x+3.3) is Y2 shifted leftward.
EigenValue(num,A11,A21,¼,An1,A22,¼A2n,¼Ann) calculates eigenvalues (using JACOBI-Algorithm) of the real-symmetric-matrix A. Only the upper triangular part of A is to be specified. The eigenvalues are sorted from small to great and num=1 will return the smallest. It is possible to enter expressions for all Aij. The order of A is recognized by the number of Aij (n/2*(n+1).
Following operators are defined:
+, *, -, /, %, ^, (), <, >, =, |, &    '|'  is the or-operator,  '&' is the and-operator, '<=' is not implemented
Following constants are defined:
	e, pi, deg=pi/180

	Data Manipulation
Select a target curve in the curve panel. If you want to modify more than one curve with the same function use the parameter 'selected curves' in the Option panel. Enter an expression like Y-Y2*x. Here Y represents original data and Y2 represents data of curve 2 interpolated at x values of original data using akima method. It is to be specified if x or y-values are to be changed.

	Fitting
A Least Square Method is implemented for fitting. First enter an expression y=f(x) and press <enter>. Now it is possible to set value for parameters in two ways. 1. Type a number.  2.  Hold down command key and draw a gaussian curve. The 6 parameters following the selected one will be tested to be assigned. The x-middle position is assigned to parameters beginning with 'x', 'p' or 't';   ground level to 'y';  width to 'w' or 'b';  and height to 'h' or 'a'. The default data range is the visible part of the curve determined in the 'option' panel. To select a range drag with <command> and <alternate> key down. To deselect click. iter is the number of the current iteration. €Ó÷É=1/(2*n) Sum i=1..n of (((yi-f(xi))/errori)^2). errori is set to the half of the error bar length or if it is not present to 1/100 of the visible y-range. lam is a step size factor that should be 1 at the final iteration. The error of a parameter is given by : sqrt(n)*error is the range of parameter where Ó÷É will increase by 1/2 and is only precise if Ó÷É is near 1 (0.2 to 5). On input, the 'error' is used as step size of the parameter. corr is the correlation factor. corr=1 if that parameter is independent from all other. If it is larger than 20 the expression is not adapted to data.

	Multi Dimension Fitting
You will rarely use it. Multi dimension fitting is turned on and off in the 'option' panel. Then the data of line i are interpreted in the following format: Column 1 (normal x-data) contains measured values zi. Column 2 contains the error of zi. Following columns contains the coordinates xi1, xi2, ... of zi. They are denoted with Y1, Y2, .. .At the end of fitting all parameters contain values that minimize the sum over all data lines i :
((zi - F(xi1, xi2, .., parameters)) / (error of  zi))^2  
Now the 'result' button in the 'Fit Parameter' panel is useful to verify the result. Input data are displayed and an additional column contains zi - F(xi1, xi2, .., parameters).
Data should be read as one curve using the 'continue' button.

	Tips
Command .  (period) interrupts drawing and fitting. Skipping is a method to reduce data point with light changes of the curve. To change the font of axis numbers select the font in the font panel and press 'set' before invoke the 'set axis font' command. If the width of a text object is not sufficient type spaces at the end of the first line. To provide the fit-function and parameter on several x-values, load in a data file with this x-values and arbitrary y-data and use the 'modify' command to set the y-values corresponding the formula.

	New in Version 1.4
layout-files to save most attributes of a plot
unlimited number of curves
unlimited numbers of windows
modify x-values of curves
simultaneous change of attributes of many curve
parameters can be fixed for fitting
Markers to recall parameters (designed for spectroscopy)
search all local maxima/minima of a curve
matrixes can be fitted to suffice given eigenvalues 
run only under NS 3.x

	New in Version 1.5
- bug fixes:
	all text-objects in layout-files
	window ordering
- a second x- and y-axis with indepenent range is availible.
- binary format input/output
- improvments in markers
- run only on MC680xx and Intel 

	Limits
10240 characters in expression
20 overlay symbols on one curve
some symbols need 'ZapfDingbats' font  
60 characters of curve name
15 decimal digits precision
50 parameter for fitting
20 characters of parameter names
1024 characters in text input data lines
only one 'Der()' and 'Int()' function could appear in an expression
no undo command

Author: 
	Rödiger Bröhl
	TU-Berlin
	Institut för Strahlungs und Kernphysik
	Hardenbergstr. 36
	10623 Berlin
	Germany

Internet:  bruehl@kalium.physik.tu-berlin.de 

Abscissa is Shareware. If you use Abscissa regularly please remit DM 50 or $ 35. Comercial distrubution is forbidden. There is no warranty for Abscissa.